home *** CD-ROM | disk | FTP | other *** search
- ' SetCursor
- '
- ' Use code like this to preset the mouse pointer position
- ' when you pop a form up on the screen
-
- Type POINTAPI
- X As Integer
- Y As Integer
- End Type
-
- Sub Text1_LostFocus ()
- Dim P As POINTAPI
- SaveMode% = Form1.ScaleMode
- Form1.ScaleMode = 3
- P.X = Command1.Left + (Command1.Width) / 2
- P.Y = Command1.Top + (Command1.Height) / 2
- ClientToScreen Form1.hWnd, P
- SetCursorPos P.X, P.Y
- Form1.ScaleMode = SaveMode%
- End Sub